<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" media="print" href="/print/_css/report.css" />
    <title>健康报告打印</title>
</head>

<body>
    <section id="reportApp" class="helth_report_box">
        <!-- 第一页 -->
        <div class="report_index">
            <div class="next_header_report" style="top:4mm;">
                <div class="print-logo_img" style="left:0mm!important;top:-19mm!important;">
                    <img class="img-logo" :src="logo" />
                </div>
                <h3 class="print-report_title" style="margin-top:30mm; font-size: 8mm;">
                    {{hosiptal}}
                </h3>
                <h3 class="print-report_title" style="margin-top:5mm;font-size: 6mm;">儿童体检报告</h3>
            </div>
            <ul class="first_child_detail" > 
                <li>
                    病&nbsp;&nbsp;历&nbsp;&nbsp;号：<span class="nav-child_item">{{detail.archivesCode}}</span>
                </li>
                <li>
                    姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：<span class="nav-child_item">{{detail.name}}</span>
                </li>
                <li>
                    性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：<span class="nav-child_item">
                        {{detail.sex ==1?'男':(detail.sex ==2?'女':'不详')}} 
                    </span>
                </li>
                
                <li>
                    出生年月：<span class="nav-child_item">{{detail.birthday}}</span>
                </li>
                <li>
                    日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期：<span class="nav-child_item">{{tjDate}}</span>
                </li>
            </ul>
            <div class="hosiptal_remark_box">
                本体检报告仅供临床参考，不作为诊断依据。谢谢您的光临！
                <!-- <label style="float: right;"> {{hosiptal}}</label> -->
            </div>
            <div style="top:250mm;right:-4.5mm;" class="hosiptal_num">1</div>
        </div>
        <!-- 第一页  end -->
        <!-- 第二页 -->
        <div class="printOrder newReport">
            <div class="next_header_report">
                <div class="print-logo_img" style="left:0mm!important;">
                    <img class="img-logo" :src="logo" />
                </div>
                <h3 style="margin-top:14mm;" class="print-report_title">
                    {{hosiptal}}
                </h3>
                <h3 class="print-report_title">儿童体检报告</h3>
            </div>
            <div class="print-pay_box" style="top:12mm!important;" >
                <div class="child_report_header" style="border-left: 1px solid #aaa;border-right: 1px solid #aaa;">
                    <div class="child_myself" style="border-top:1px solid #aaa;">
                        <div class="child-my_item" style="width:35%;">
                            <span style="width:20mm">姓名</span>
                            {{detail.name}}
                        </div>
                        <div class="child-my_item" style="width:35%;">
                            <span style="width:20mm">年龄</span>
                            {{ageView}}
                        </div>
                        <div class="child-my_item">
                            <span style="width:20mm">性别</span>
                            {{detail.sex == 1 ? "男" : "女" }}
                        </div>
                    </div>
                    <div class="child_myself">
                        <div class="child-my_item" style="width:35%;">
                            <span style="width:20mm">联系电话</span>
                            {{detail.mobile}}
                        </div>
                        <div class="child-my_item" style="border-right:0px;width:62%;">
                            <span style="width:20mm">联系地址</span>
                            {{detail.address}}
                        </div>
                    </div>
                </div>
                <div class="child_report_content" style="border-left: 1px solid #aaa;border-right: 1px solid #aaa;">
                    <div class="project-item last_Project" style="height:36mm;">
                        <div class="pro_title">
                            <span>基础检查</span>
                        </div>
                        <div class="pro_item-content">
                            <!-- <div class="pro_item_box">
                            <div class="pro_item">
                                <span>身高</span>
                                <label></label> CM
                            </div>
                            <div class="pro_item">
                                <span>身高评价</span>
                                <label></label> CM
                            </div>
                        </div>
                        <div class="pro_item_box">
                            <div class="pro_item">
                                <span>体重</span>
                                <label></label> KG
                            </div>
                            <div class="pro_item">
                                <span>体重评价</span>
                                <label></label>
                            </div>
                        </div>
                        <div class="pro_item_box">
                            <div class="pro_item">
                                <span>头围</span>
                                <label></label>
                            </div>
                        </div>
                        <div class="pro_item_box">
                            <div class="pro_item">
                                <span>胸围</span>
                                <label></label>
                            </div>
                        </div> -->
                            <div class="pro_item_box">
                                <div v-for="(item,index) in signForm" class="pro_item">
                                    <span>{{item.attrName}}</span>
                                    <label>{{item.values}}{{item.attrUnit}}</label>
                                </div>
                                <!-- <div v-for="(item,index) in signForm" v-if="item.id=='1000030006'" class="pro_item">
                                <span>{{item.attrName}}</span>
                                <label>{{bmi}}</label>
                            </div> -->
                                <div class="pro_item">
                                    <span></span>
                                    <label></label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="project-item" style="height:117mm;">
                        <div class="pro_title">
                            <span>体格检查</span>
                        </div>
                        <div class="pro_item-content">
                            <div class="pro_item_box">
                                <div v-for="(item,index) in infos" :key="index" class="pro_item"
                                    :style="{'border-right':(index+1)%2==0?'0px':''}">
                                    <span>{{item.attrName}}</span>
                                    <!-- <label v-if="item.attrType=='SELECT'"> {{item.values2}}{{item.attrUnit}}</label> -->
                                    <label> {{item.printvalue}}{{item.attrUnit}}</label>
                                </div>
                                <div class="pro_item" v-if="isCeil" style="border-left: 0px;">
                                    <span></span>
                                    <label></label>
                                </div>
                                <!-- <div class="pro_item">
                                <span>头颅</span>
                            </div>
                            <div class="pro_item">
                                <span>心（听诊）</span>
                            </div>
                            <div class="pro_item">
                                <span>眼睛</span>
                            </div>
                            <div class="pro_item">
                                <span>肺（听诊）</span>
                            </div>
                            <div class="pro_item">
                                <span>耳</span>
                            </div>
                            <div class="pro_item">
                                <span>肝（肋下）</span>
                            </div>
                            <div class="pro_item">
                                <span>鼻</span>
                            </div>
                            <div class="pro_item">
                                <span>脾（肋下）</span>
                            </div>
                            <div class="pro_item">
                                <span>口腔</span>
                            </div>
                            <div class="pro_item">
                                <span>骨骼</span>
                            </div>
                            <div class="pro_item">
                                <span>腮腺</span>
                            </div>
                            <div class="pro_item">
                                <span>胸廓</span>
                            </div>
                            <div class="pro_item">
                                <span>颈部</span>
                            </div>
                            <div class="pro_item">
                                <span>腹部</span>
                            </div>
                            <div class="pro_item">
                                <span>浅表淋巴结</span>
                            </div>
                            <div class="pro_item">
                                <span>肛门</span>
                            </div>
                            <div class="pro_item">
                                <span>脊柱</span>
                            </div>
                            <div class="pro_item">
                                <span>外生殖器</span>
                            </div> -->
                            </div>
                        </div>
                    </div>
                    <div class="project-item" style="height:18mm;"
                        :style="{'border-bottom':isSpirit==false?'1px solid #aaa':'0px'}">
                        <div class="pro_title">
                            <span style="top:6mm;left:4mm;">视/听力检查</span>
                        </div>
                        <div class="pro_item-content">
                            <div class="pro_item_box">
                                <div class="pro_item">
                                    <span>左眼</span>
                                    <label v-if="leftEye">{{leftEye}}</label>
                                </div>
                                <div class="pro_item">
                                    <span>左耳</span>
                                    <label v-if="leftEar">{{leftEar}}</label>
                                    <!-- 正常 -->
                                </div>
                                <div class="pro_item">
                                    <span>右眼</span>
                                    <label v-if="rightEye">{{rightEye}}</label>
                                </div>
                                <div class="pro_item">
                                    <span>右耳</span>
                                    <label v-if="rightEar">{{rightEar}}</label>
                                    <!-- 正常 -->
                                </div>
                            </div>
                            <!-- <div class="pro_item_box">
                        
                    </div> -->
                        </div>
                    </div>
                    <div class="project-item" style="line-height:12mm;">
                        <div class="pro_title">
                            <span style="top:0mm;left:6mm;">精神发育</span>
                        </div>
                        <div class="pro_item-content">
                            <div class="pro_item_box" style="text-indent:10px;line-height:4mm!important;">
                                <span>{{spirit}}</span>
                                <!-- <span v-if="motion" style="display: inline-block;margin-left: 2mm;">大动作：{{motion}}</span> -->
                            </div>
                        </div>
                    </div>
                    <div class="project-item" style="line-height:12mm;border-bottom: 1px solid #aaa;">
                        <div class="pro_title">
                            <span style="top:0mm;left:6mm;">动作发育</span>
                        </div>
                        <div class="pro_item-content">
                            <div class="pro_item_box" style="text-indent:10px;line-height:4mm!important;">
                                <span>{{motion}}</span>
                            </div>
                        </div>
                    </div>
                    <!-- <div class="project-item" style="line-height:15mm;">
                    <div class="pro_title">
                        <span style="top:5%;"></span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="text-indent:10px;">
                        </div>
                    </div>
                </div> -->
                </div>
            </div>
            <div class="hosiptal_num">2</div>
        </div>
        <!-- 第二页  end -->
        <!-- 第三页 -->
        <div class="printOrder newReport next_report">
            <div class="next_header_report">
                <div class="print-logo_img" style="left:0mm!important;top:14mm!important;">
                    <img class="img-logo" :src="logo" />
                </div>
            </div>
            <div class="print-pay_box print_check_box" style="margin-top:22mm;">
                <div style="line-height:12mm;" class="project-item">
                    <div class="pro_title" style="height: 100%;display: inline-block;">
                        <span style="top:0mm;left:4.5mm;">实验室检查</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="text-indent:10px;">
                            <!-- 正常 -->
                            {{syans}}
                        </div>
                    </div>
                </div>
                <div style="line-height:12mm;" class="project-item">
                    <div class="pro_title" style="height: 100%;display: inline-block;">
                        <span style="top:0mm;left:6mm;">辅助检查</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="padding-left:10px;">
                            <!-- 正常 -->
                            {{fzjc}}
                        </div>
                    </div>
                </div>
                <div class="project-item" style="line-height:12mm;">
                    <div class="pro_title">
                        <span style="top:0mm;left:6mm;">综合评估</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="padding-left:10px;line-height:4mm!important;padding-top:2mm;">
                            {{zhpj}}
                        </div>
                    </div>
                </div>
                <div class="project-item" style="line-height:12mm;border-bottom:1px solid #aaa;">
                    <div class="pro_title">
                        <span style="top:5%;left:9.5mm;">指导</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="padding-left:10px; line-height:4mm!important;padding-top:2mm;">
                            {{zd}}
                        </div>
                    </div>
                </div>
            </div>

            <div class="print-pay_box print_paste_box" style="margin-top: 10mm;">
                报告粘贴处
            </div>
            <div class="print_footer_box">
                <label style="font-size:4mm;">医师签字：</label>
                <!-- <span class="sign_size"></span> -->
            </div>
            <div class="hosiptal_num">3</div>
        </div>
    </section>
    <!-- built files will be auto injected -->
    <script src="https://lib.baomitu.com/vue/2.6.10/vue.min.js"></script>
    <script src="https://lib.baomitu.com/axios/0.17.0/axios.min.js"></script>
    <script src="https://lib.baomitu.com/qs/6.5.2/qs.min.js"></script>
    <!-- <script src="/src/_js/http.js"></script> -->
    <script>
        var vm = new Vue({
            el: "#reportApp",
            data: {
                detail: '',
                signForm: '',
                hosiptal: '',
                infos: '',
                tgHeight: '',
                jcHeight: '',
                leftEye: '',
                rightEye: '',
                rightEar: '',
                leftEar: '',
                zd: '',
                syans: '',
                bmi: '',
                logo: '',
                zhpj: '',
                fzjc:'',
                isCeil: true,
                isZd: true,
                isSys: true,
                isSpirit: true,
                tjHeight: '',
                tjDate:'',
                ageView:'',
                spirit: '',//精神
                motion: ''//动作
            },
            filters: {
                "toSex": function (value) {
                    return value == 1 ? "男" : "女";
                }
            },
            mounted() {
                var th = this;
                window.addEventListener("message", function (event) {
                    var data = event.data;
                    var pa = JSON.parse(data.params)
                    if (data.cmd == "postJson") {
                        th.$nextTick(function () {
                            th.detail = pa.detail;
                            th.signForm = pa.signForm;
                            th.infos = pa.infos
                            th.leftEye = pa.leftEye
                            th.rightEye = pa.rightEye
                            th.leftEar = pa.leftEar
                            th.rightEar = pa.rightEar
                            th.ageView=pa.ageView
                            th.zd = pa.zd
                            th.logo = pa.logo
                            th.syans = pa.syans
                            th.zhpj=pa.zhpj
                            th.isCeil = pa.isCeil;
                            th.spirit = pa.spirit;
                            th.fzjc=pa.fzjc;
                            th.tjHeight = pa.tjHeight;
                            th.tjDate=pa.tjDate;
                            th.isSys = pa.isSys
                            th.isZd = pa.isZd
                            th.bmi = pa.bmi
                            th.isSpirit = pa.isSpirit;
                            th.motion = pa.motion
                            th.hosiptal = pa.hospitalName
                            setTimeout(function () {
                                window.print();
                                // window.document.body.innerHTML = document.getElementsByClassName("printOrder")[0].innerHTML;
                            }, 500);
                        });
                    }
                })
            },
            methods: {
                getOrderItem() {
                    console.log("111");
                }
            },
        })
        console.log(vm);
        vm.getOrderItem();
    </script>
</body>

</html>